-
Notifications
You must be signed in to change notification settings - Fork 81
Add pins to dependency height #2246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ade9dab to
3595078
Compare
c1e9e21 to
941d475
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds block height pinning to Flow dependency manager, enabling reproducible dependency installation across machines and CI environments. Dependencies are now frozen to specific blockchain block heights, ensuring consistent contract versions.
Key changes:
- Block height tracking for each dependency with automatic pinning on install
- Historical contract retrieval using
GetAccountAtBlockHeightfor pinned versions - Backward-compatible migration (zero block heights auto-migrate to latest)
- Spork recovery logic to handle inaccessible historical blocks
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
internal/dependencymanager/dependencyinstaller.go |
Implements block height caching, historical contract fetching, spork recovery, and cross-network duplicate detection |
internal/dependencymanager/dependencyinstaller_test.go |
Comprehensive test coverage for block height pinning scenarios including new dependencies, migrations, spork recovery, and caching |
go.mod |
Updates flowkit dependency and promotes flow-core-contracts to direct dependency |
flowkit/schema.json |
Adds block_height and canonical fields to JSON schema for dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #2243
Description
Adds
block_heightpins to DM dependencies.block_heightpins will be added after the first install after updating.flow.jsonis still backward-compatible with old CLI version, and will just ignore the unknown fieldFor contributor use:
masterbranchFiles changedin the Github PR explorer